home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 15: Shareware / PC Actual CDT 15.iso / files / Windows_95_98 / Programacion / Java / kinst351a.exe / data1.cab / plugin_samples / KawaPlugin8.java < prev    next >
Encoding:
Java Source  |  2000-02-17  |  1.4 KB  |  47 lines

  1. import java.util.*;
  2. import com.tektools.kawa.plugin.*;
  3.  
  4. /** This command is a sample for Kawa editor manipulation */
  5. public class KawaPlugin8
  6. {
  7.     public static void main(String[] args)
  8.     {
  9.         KawaApp.out.showWindow(true);
  10.         KawaApp.out.clearWindow();
  11.         for (int i=0;i<args.length;i++)
  12.             KawaApp.out.println("Arg["+i+"] - "+args[i]);
  13.         String[] files = new String[100];    
  14.         int count=0;
  15.         Enumeration enum = KawaApp.enumerateProjects();
  16.         while (enum.hasMoreElements())
  17.         {
  18.             KawaProject proj = (KawaProject)enum.nextElement();            
  19.             if (proj != null)
  20.             {
  21.                 if (!proj.isOpen()) continue;
  22.                 KawaApp.build.println("Name - "+proj.getName()+" Path - "+proj.getPath());
  23.                 // Enumerate all files in the project...
  24.                 Enumeration fileEnum = proj.enumerateAllFiles();
  25.                 while(fileEnum.hasMoreElements())
  26.                 {
  27.                     KawaFile file = (KawaFile)fileEnum.nextElement();
  28. //                    if (file != null)
  29. //                    {
  30. //                        KawaEditor editor = file.getEditor(true);
  31. //                        if (editor != null)
  32. //                        {
  33. //                            editor.setSelect(0, 100);
  34. //                            String text = editor.getSelectText();
  35. //                            KawaApp.out.println("Start - "+editor.getSelectStart()+"End - "+editor.getSelectEnd());
  36. //                            KawaApp.out.println(text);
  37. //                            editor.paste("test");
  38. //                        }
  39. //                        break;
  40. //                    }
  41.                 }
  42.             }
  43.         }
  44.         KawaEditor editor = new KawaEditor(args[0]);
  45.         editor.open();
  46.     }
  47. }